package purchase.service;

import java.util.List;

import purchase.domain.Purchase;

/**
 * purchase service interface
 * 
 * @author Mike
 *
 */
public interface PurchaseService {
	
	//---------------------------crud----------------------------
	public Long getNewOid();

	public Purchase addPurchase(Purchase purchase);
	
	public Purchase updatePurchase(Purchase purchase);
	
	public Purchase deletePurchaseById(Long purchaseId);
	
	public Purchase findPurchaseById(Long purchaseId);
	
	public List<Purchase> queryPurchaseList();
	
	
	//---------------------------process operate----------------------------
	public Purchase createPurchaseAndStartProcess(Purchase purchase);
	
	public Purchase mgrApprovePurchaseAndProcess(Purchase purchase);
	
	public Purchase cancelPurchaseAndProcess(Purchase purchase);
	
	public Purchase modifyPurchaseAndProcess(Purchase purchase);
	
	public List<Purchase> getMyTaskList(String actorId);
	
	public Purchase findPurchaseAndProcessById(Long purchaseId,Long taskId);
}
